package com.example.sentineldemo.job;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Package: com.example.sentineldemo.job
 * @ClassName: HelloJob
 * @Author: Think
 * @CreateTime: 2021/7/14 16:31
 * @Description:
 */
@Slf4j
@Component
public class HelloJob {

    @Scheduled(cron = "0/10 * * * * ?")
    @SentinelResource("helloJob")
    public void startHello(){
        log.info("hello! hello.");
    }

}
